package com.example.tests;

import java.util.Set;

import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;

import org.testng.annotations.Test;

import com.example.fw.GroupObject;
import com.example.fw.Groups;

public class EmptyGroupCreationTest extends TestBase {
	@Test
	public void testGroupWithEmptyDataCanBeCreated() throws Exception {
		GroupObject emptyDataGroup = new GroupObject()
			.setName("").setHeader("").setFooter("");
		//Set<GroupObject> oldList = app.getGroupHelper().getGroups();
		Groups oldList = app.getGroupHelper().getGroups();
		app.getGroupHelper().createGroup(emptyDataGroup);
		Groups newList = app.getGroupHelper().getGroups();
		//verifyGroupAdded(oldList, emptyDataGroup, newList);
		assertThat(newList, equalTo(oldList.withAdded(emptyDataGroup)));
	}
}
